using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VARTDISP
    {
        public DataRow Convert2ARTDISP(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryARTDISP(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["ADMANDANT"] = " ".PadRight(2 ); 
         dwReturn["ADKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["ADWERK"] = " ".PadRight(3 ); 
         dwReturn["ADABT"] = " ".PadRight(3 ); 
         dwReturn["ADWAKZ"] = " ".PadRight(1 ); 
         dwReturn["ADART"] = " ".PadRight(20 ); 
         dwReturn["ADVAR"] = " ".PadRight(3 ); 
         dwReturn["ADFARBE"] = " ".PadRight(10 ); 
         dwReturn["ADDESS"] = " ".PadRight(10 ); 
         dwReturn["ADCOL"] = " ".PadRight(10 ); 
         dwReturn["ADBESCH"] = " ".PadRight(10 ); 
         dwReturn["ADZUSTAND"] = " ".PadRight(4 ); 
         dwReturn["ADLO"] = " ".PadRight(2 ); 
         dwReturn["ADAENDZL"] = " ".PadRight(0 ); 
         dwReturn["ADAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["ADAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["ADNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["ADNEUDAT"] = " ".PadRight(0 ); 
         dwReturn["ADSTA"] = " ".PadRight(1 ); 
         dwReturn["ADSTD"] = " ".PadRight(0 ); 
         dwReturn["ADFERTKZ"] = " ".PadRight(1 ); 
         dwReturn["ADSOBSL"] = " ".PadRight(2 ); 
         dwReturn["ADAUSDT"] = " ".PadRight(0 ); 
         dwReturn["ADKAUTB"] = " ".PadRight(1 ); 
         dwReturn["ADTAX"] = " ".PadRight(3 ); 
         dwReturn["ADUSEQE"] = " ".PadRight(1 ); 
         dwReturn["ADWEBAZ"] = " ".PadRight(0 ); 
         dwReturn["ADPLIFZ"] = " ".PadRight(0 ); 
         dwReturn["ADFRGRP"] = " ".PadRight(8 ); 
         dwReturn["ADWELB"] = " ".PadRight(2 ); 
         dwReturn["ADHERKL"] = " ".PadRight(3 ); 
         dwReturn["ADURCOUNTY"] = " ".PadRight(4 ); 
         dwReturn["ADPRAEF"] = " ".PadRight(1 ); 
         dwReturn["ADSTAWN"] = " ".PadRight(17 ); 
         dwReturn["ADMTVER"] = " ".PadRight(4 ); 
         dwReturn["ADMOWNR"] = " ".PadRight(12 ); 
         dwReturn["ADMOGRU"] = " ".PadRight(6 ); 
         dwReturn["ADLIEFKL"] = " ".PadRight(1 ); 
         dwReturn["ADDISMM"] = " ".PadRight(2 ); 
         dwReturn["ADLFRHY"] = " ".PadRight(2 ); 
         dwReturn["ADMINBST"] = " ".PadRight(0 ); 
         dwReturn["ADMAXBST"] = " ".PadRight(0 ); 
         dwReturn["ARFXHOR"] = " ".PadRight(0 ); 
         dwReturn["ADMINRW"] = " ".PadRight(0 ); 
         dwReturn["ADLOSGRMI"] = " ".PadRight(0 ); 
         dwReturn["ADLOSGRMA"] = " ".PadRight(0 ); 
         dwReturn["ADLOSGRFE"] = " ".PadRight(0 ); 
         dwReturn["ADMIMRW"] = " ".PadRight(0 ); 
         dwReturn["ADMAXRW"] = " ".PadRight(0 ); 
         dwReturn["ADBASRW"] = " ".PadRight(0 ); 
         dwReturn["ADDISLS"] = " ".PadRight(2 ); 
         dwReturn["ADRDPRF"] = " ".PadRight(4 ); 
         dwReturn["ADZUTART"] = " ".PadRight(1 ); 
         dwReturn["ADWZEIT"] = " ".PadRight(0 ); 
         dwReturn["ADSHZET"] = " ".PadRight(0 ); 
         dwReturn["ADFHORI"] = " ".PadRight(3 ); 
         dwReturn["ADVPMAT"] = " ".PadRight(20 ); 
         dwReturn["ADVPVAR"] = " ".PadRight(3 ); 
         dwReturn["ADVPUMREF"] = " ".PadRight(0 ); 
         dwReturn["ADVPWRK"] = " ".PadRight(2 ); 
         dwReturn["ADVRMOD"] = " ".PadRight(1 ); 
         dwReturn["ADSTRGR"] = " ".PadRight(2 ); 
         dwReturn["ADMAABC"] = " ".PadRight(1 ); 
         dwReturn["ADSACHDSP"] = " ".PadRight(8 ); 
         dwReturn["ADDISPSTF"] = " ".PadRight(2 ); 
         dwReturn["ADSTDLB"] = " ".PadRight(2 ); 
         dwReturn["ADSTDLP"] = " ".PadRight(8 ); 
         dwReturn["ADPRDLB"] = " ".PadRight(2 ); 
         dwReturn["ADPERKZ"] = " ".PadRight(1 ); 
         dwReturn["ADFILLER"] = " ".PadRight(65 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapARTDISP(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveARTDISP(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryARTDISP(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapARTDISP(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertARTDISP(dwLocal, ITXDBVERSION);
            }
            UpdateARTDISP(dwLocal);
        }
        public void InsertARTDISP(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO ARTDISP(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryARTDISP(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM ARTDISP WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM ARTDISP  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "ARTDISP";
            Return = Result;
            return Return;
        }
        public void DeleteARTDISP(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM ARTDISP   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateARTDISP(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE ARTDISP SET "
                    +"ADMANDANT= :ADMANDANT,"
                    +"ADKUNDNR= :ADKUNDNR,"
                    +"ADWERK= :ADWERK,"
                    +"ADABT= :ADABT,"
                    +"ADWAKZ= :ADWAKZ,"
                    +"ADART= :ADART,"
                    +"ADVAR= :ADVAR,"
                    +"ADFARBE= :ADFARBE,"
                    +"ADDESS= :ADDESS,"
                    +"ADCOL= :ADCOL,"
                    +"ADBESCH= :ADBESCH,"
                    +"ADZUSTAND= :ADZUSTAND,"
                    +"ADLO= :ADLO,"
                    +"ADAENDZL= :ADAENDZL,"
                    +"ADAENDBEN= :ADAENDBEN,"
                    +"ADAENDDAT= :ADAENDDAT,"
                    +"ADNEUBEN= :ADNEUBEN,"
                    +"ADNEUDAT= :ADNEUDAT,"
                    +"ADSTA= :ADSTA,"
                    +"ADSTD= :ADSTD,"
                    +"ADFERTKZ= :ADFERTKZ,"
                    +"ADSOBSL= :ADSOBSL,"
                    +"ADAUSDT= :ADAUSDT,"
                    +"ADKAUTB= :ADKAUTB,"
                    +"ADTAX= :ADTAX,"
                    +"ADUSEQE= :ADUSEQE,"
                    +"ADWEBAZ= :ADWEBAZ,"
                    +"ADPLIFZ= :ADPLIFZ,"
                    +"ADFRGRP= :ADFRGRP,"
                    +"ADWELB= :ADWELB,"
                    +"ADHERKL= :ADHERKL,"
                    +"ADURCOUNTY= :ADURCOUNTY,"
                    +"ADPRAEF= :ADPRAEF,"
                    +"ADSTAWN= :ADSTAWN,"
                    +"ADMTVER= :ADMTVER,"
                    +"ADMOWNR= :ADMOWNR,"
                    +"ADMOGRU= :ADMOGRU,"
                    +"ADLIEFKL= :ADLIEFKL,"
                    +"ADDISMM= :ADDISMM,"
                    +"ADLFRHY= :ADLFRHY,"
                    +"ADMINBST= :ADMINBST,"
                    +"ADMAXBST= :ADMAXBST,"
                    +"ARFXHOR= :ARFXHOR,"
                    +"ADMINRW= :ADMINRW,"
                    +"ADLOSGRMI= :ADLOSGRMI,"
                    +"ADLOSGRMA= :ADLOSGRMA,"
                    +"ADLOSGRFE= :ADLOSGRFE,"
                    +"ADMIMRW= :ADMIMRW,"
                    +"ADMAXRW= :ADMAXRW,"
                    +"ADBASRW= :ADBASRW,"
                    +"ADDISLS= :ADDISLS,"
                    +"ADRDPRF= :ADRDPRF,"
                    +"ADZUTART= :ADZUTART,"
                    +"ADWZEIT= :ADWZEIT,"
                    +"ADSHZET= :ADSHZET,"
                    +"ADFHORI= :ADFHORI,"
                    +"ADVPMAT= :ADVPMAT,"
                    +"ADVPVAR= :ADVPVAR,"
                    +"ADVPUMREF= :ADVPUMREF,"
                    +"ADVPWRK= :ADVPWRK,"
                    +"ADVRMOD= :ADVRMOD,"
                    +"ADSTRGR= :ADSTRGR,"
                    +"ADMAABC= :ADMAABC,"
                    +"ADSACHDSP= :ADSACHDSP,"
                    +"ADDISPSTF= :ADDISPSTF,"
                    +"ADSTDLB= :ADSTDLB,"
                    +"ADSTDLP= :ADSTDLP,"
                    +"ADPRDLB= :ADPRDLB,"
                    +"ADPERKZ= :ADPERKZ,"
                    +"ADFILLER= :ADFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("ADMANDANT", OracleType.NVarChar).Value = dwData["ADMANDANT"].ToString(); 
          or1.Parameters.Add("ADKUNDNR", OracleType.NVarChar).Value = dwData["ADKUNDNR"].ToString(); 
          or1.Parameters.Add("ADWERK", OracleType.NVarChar).Value = dwData["ADWERK"].ToString(); 
          or1.Parameters.Add("ADABT", OracleType.NVarChar).Value = dwData["ADABT"].ToString(); 
          or1.Parameters.Add("ADWAKZ", OracleType.NVarChar).Value = dwData["ADWAKZ"].ToString(); 
          or1.Parameters.Add("ADART", OracleType.NVarChar).Value = dwData["ADART"].ToString(); 
          or1.Parameters.Add("ADVAR", OracleType.NVarChar).Value = dwData["ADVAR"].ToString(); 
          or1.Parameters.Add("ADFARBE", OracleType.NVarChar).Value = dwData["ADFARBE"].ToString(); 
          or1.Parameters.Add("ADDESS", OracleType.NVarChar).Value = dwData["ADDESS"].ToString(); 
          or1.Parameters.Add("ADCOL", OracleType.NVarChar).Value = dwData["ADCOL"].ToString(); 
          or1.Parameters.Add("ADBESCH", OracleType.NVarChar).Value = dwData["ADBESCH"].ToString(); 
          or1.Parameters.Add("ADZUSTAND", OracleType.NVarChar).Value = dwData["ADZUSTAND"].ToString(); 
          or1.Parameters.Add("ADLO", OracleType.NVarChar).Value = dwData["ADLO"].ToString(); 
          or1.Parameters.Add("ADAENDZL", OracleType.NVarChar).Value = dwData["ADAENDZL"].ToString(); 
          or1.Parameters.Add("ADAENDBEN", OracleType.NVarChar).Value = dwData["ADAENDBEN"].ToString(); 
          or1.Parameters.Add("ADAENDDAT", OracleType.NVarChar).Value = dwData["ADAENDDAT"].ToString(); 
          or1.Parameters.Add("ADNEUBEN", OracleType.NVarChar).Value = dwData["ADNEUBEN"].ToString(); 
          or1.Parameters.Add("ADNEUDAT", OracleType.NVarChar).Value = dwData["ADNEUDAT"].ToString(); 
          or1.Parameters.Add("ADSTA", OracleType.NVarChar).Value = dwData["ADSTA"].ToString(); 
          or1.Parameters.Add("ADSTD", OracleType.NVarChar).Value = dwData["ADSTD"].ToString(); 
          or1.Parameters.Add("ADFERTKZ", OracleType.NVarChar).Value = dwData["ADFERTKZ"].ToString(); 
          or1.Parameters.Add("ADSOBSL", OracleType.NVarChar).Value = dwData["ADSOBSL"].ToString(); 
          or1.Parameters.Add("ADAUSDT", OracleType.NVarChar).Value = dwData["ADAUSDT"].ToString(); 
          or1.Parameters.Add("ADKAUTB", OracleType.NVarChar).Value = dwData["ADKAUTB"].ToString(); 
          or1.Parameters.Add("ADTAX", OracleType.NVarChar).Value = dwData["ADTAX"].ToString(); 
          or1.Parameters.Add("ADUSEQE", OracleType.NVarChar).Value = dwData["ADUSEQE"].ToString(); 
          or1.Parameters.Add("ADWEBAZ", OracleType.NVarChar).Value = dwData["ADWEBAZ"].ToString(); 
          or1.Parameters.Add("ADPLIFZ", OracleType.NVarChar).Value = dwData["ADPLIFZ"].ToString(); 
          or1.Parameters.Add("ADFRGRP", OracleType.NVarChar).Value = dwData["ADFRGRP"].ToString(); 
          or1.Parameters.Add("ADWELB", OracleType.NVarChar).Value = dwData["ADWELB"].ToString(); 
          or1.Parameters.Add("ADHERKL", OracleType.NVarChar).Value = dwData["ADHERKL"].ToString(); 
          or1.Parameters.Add("ADURCOUNTY", OracleType.NVarChar).Value = dwData["ADURCOUNTY"].ToString(); 
          or1.Parameters.Add("ADPRAEF", OracleType.NVarChar).Value = dwData["ADPRAEF"].ToString(); 
          or1.Parameters.Add("ADSTAWN", OracleType.NVarChar).Value = dwData["ADSTAWN"].ToString(); 
          or1.Parameters.Add("ADMTVER", OracleType.NVarChar).Value = dwData["ADMTVER"].ToString(); 
          or1.Parameters.Add("ADMOWNR", OracleType.NVarChar).Value = dwData["ADMOWNR"].ToString(); 
          or1.Parameters.Add("ADMOGRU", OracleType.NVarChar).Value = dwData["ADMOGRU"].ToString(); 
          or1.Parameters.Add("ADLIEFKL", OracleType.NVarChar).Value = dwData["ADLIEFKL"].ToString(); 
          or1.Parameters.Add("ADDISMM", OracleType.NVarChar).Value = dwData["ADDISMM"].ToString(); 
          or1.Parameters.Add("ADLFRHY", OracleType.NVarChar).Value = dwData["ADLFRHY"].ToString(); 
          or1.Parameters.Add("ADMINBST", OracleType.NVarChar).Value = dwData["ADMINBST"].ToString(); 
          or1.Parameters.Add("ADMAXBST", OracleType.NVarChar).Value = dwData["ADMAXBST"].ToString(); 
          or1.Parameters.Add("ARFXHOR", OracleType.NVarChar).Value = dwData["ARFXHOR"].ToString(); 
          or1.Parameters.Add("ADMINRW", OracleType.NVarChar).Value = dwData["ADMINRW"].ToString(); 
          or1.Parameters.Add("ADLOSGRMI", OracleType.NVarChar).Value = dwData["ADLOSGRMI"].ToString(); 
          or1.Parameters.Add("ADLOSGRMA", OracleType.NVarChar).Value = dwData["ADLOSGRMA"].ToString(); 
          or1.Parameters.Add("ADLOSGRFE", OracleType.NVarChar).Value = dwData["ADLOSGRFE"].ToString(); 
          or1.Parameters.Add("ADMIMRW", OracleType.NVarChar).Value = dwData["ADMIMRW"].ToString(); 
          or1.Parameters.Add("ADMAXRW", OracleType.NVarChar).Value = dwData["ADMAXRW"].ToString(); 
          or1.Parameters.Add("ADBASRW", OracleType.NVarChar).Value = dwData["ADBASRW"].ToString(); 
          or1.Parameters.Add("ADDISLS", OracleType.NVarChar).Value = dwData["ADDISLS"].ToString(); 
          or1.Parameters.Add("ADRDPRF", OracleType.NVarChar).Value = dwData["ADRDPRF"].ToString(); 
          or1.Parameters.Add("ADZUTART", OracleType.NVarChar).Value = dwData["ADZUTART"].ToString(); 
          or1.Parameters.Add("ADWZEIT", OracleType.NVarChar).Value = dwData["ADWZEIT"].ToString(); 
          or1.Parameters.Add("ADSHZET", OracleType.NVarChar).Value = dwData["ADSHZET"].ToString(); 
          or1.Parameters.Add("ADFHORI", OracleType.NVarChar).Value = dwData["ADFHORI"].ToString(); 
          or1.Parameters.Add("ADVPMAT", OracleType.NVarChar).Value = dwData["ADVPMAT"].ToString(); 
          or1.Parameters.Add("ADVPVAR", OracleType.NVarChar).Value = dwData["ADVPVAR"].ToString(); 
          or1.Parameters.Add("ADVPUMREF", OracleType.NVarChar).Value = dwData["ADVPUMREF"].ToString(); 
          or1.Parameters.Add("ADVPWRK", OracleType.NVarChar).Value = dwData["ADVPWRK"].ToString(); 
          or1.Parameters.Add("ADVRMOD", OracleType.NVarChar).Value = dwData["ADVRMOD"].ToString(); 
          or1.Parameters.Add("ADSTRGR", OracleType.NVarChar).Value = dwData["ADSTRGR"].ToString(); 
          or1.Parameters.Add("ADMAABC", OracleType.NVarChar).Value = dwData["ADMAABC"].ToString(); 
          or1.Parameters.Add("ADSACHDSP", OracleType.NVarChar).Value = dwData["ADSACHDSP"].ToString(); 
          or1.Parameters.Add("ADDISPSTF", OracleType.NVarChar).Value = dwData["ADDISPSTF"].ToString(); 
          or1.Parameters.Add("ADSTDLB", OracleType.NVarChar).Value = dwData["ADSTDLB"].ToString(); 
          or1.Parameters.Add("ADSTDLP", OracleType.NVarChar).Value = dwData["ADSTDLP"].ToString(); 
          or1.Parameters.Add("ADPRDLB", OracleType.NVarChar).Value = dwData["ADPRDLB"].ToString(); 
          or1.Parameters.Add("ADPERKZ", OracleType.NVarChar).Value = dwData["ADPERKZ"].ToString(); 
          or1.Parameters.Add("ADFILLER", OracleType.NVarChar).Value = dwData["ADFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
